package com.denlaku.longan.service.impl;

import com.denlaku.longan.repository.DataModelItemRepository;
import com.denlaku.longan.service.DataModelItemService;
import com.denlaku.longan.vo.DataModelItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author tianx
 */
@Service
public class DataModelItemServiceImpl implements DataModelItemService {
    @Autowired
    private DataModelItemRepository dataModelItemRepository;

    @Override
    public void batchAdd(List<DataModelItem> dataModelItemList) {
        dataModelItemRepository.batchAdd(dataModelItemList);
    }

    @Override
    public void delete(Long tenantId, Long dataModelId) {
        dataModelItemRepository.delete(tenantId, dataModelId);
    }

    @Override
    public List<DataModelItem> list(Long tenantId, Long dataModelId) {
        return dataModelItemRepository.list(tenantId, dataModelId);
    }
}
